import React, { Component } from 'react';
import {
  BrowserRouter as Router,
  Route,
  Link
} from 'react-router-dom'

import Child from '../components/Child'

class App extends Component {
  render() {
    return (
      <Router> 
        <div className="App">
            <ul>
              <li><Link to='/home'>首页</Link></li>
              <li><Link to='/category'>分类</Link></li>
              <li><Link to='/rank'>排名</Link></li>
            </ul>
            <Route path='/:id' component={Child}/>
        </div>
      </Router>
    );
  }
}

export default App;
